import { defineConfig } from 'vitepress'
import UnoCSS from 'unocss/vite'
import Components from 'unplugin-vue-components/vite'

export default defineConfig({
  title: 'Aitter',
  description: 'Just playing around.',
  base: '/',
  lang: 'zh-CN',
  vite: {
    plugins: [
      UnoCSS(),
      Components({
        dirs: [
          '/components',
        ],
        include: [
          /\.vue$/,
          /\.vue\?vue/,
          /\.md$/,
        ],
      }),
    ]
  },
  themeConfig: {
    search: {
      provider: 'local'
    },
    // 导航栏
    nav: [
      { text: '前端', link: '/frontend/index.md' },
      { text: '动效', link: '/effects/index.md' },
    ],
    // 侧边栏
    sidebar: {
       // 当用户位于 `guide` 目录时，会显示此侧边栏
       '/effects/': [
        {
          text: '动效',
          items: [
            { text: '介绍', link: '/effects/index.md' },
            { text: 'GitHub首页', link: '/effects/scroll-github.md' },
          ]
        }
      ],
    },
    footer: {
      copyright: 'Copyright © 2024-present Aitter'
    },
  }
})